Running Control Panel Applets

level: any

by Alyce Watson [http://alycesrestaurant.com/]


Windows computers come with several management functions in the form of small programs called applets. We can invoke these applets with our Liberty BASIC code. We can cause things like the control panel, desktop settings, and accessibility options applets to run.

The control panel looks like this:

The desktop properties dialog looks like this:

The following commands show how to use the rundll32.exe program to invoke these applets. Control panel applets have the extension *.cpl. Most of the examples come from the shell32.dll, but there are a few other goodies in the list.

These commands simply call up dialogs. They do not cause any changes to be made to the user's computer. The user can make changes in the dialogs, or cancel them.

The Command List

The following RUN commands are meant to be used individually. Do not attempt to run the entire code below as is. Extract the commands you need and insert them into your code in appropriate places, one at a time. The comments accompanying each RUN command explain the functions.

' To Display the Control Panel
run "rundll32.exe shell32.dll Control_RunDLL"

' To Display Add/Remove Programs
run "rundll32.exe shell32.dll Control_RunDLL appwiz.cpl"

'To Display System Properties
run "rundll32.exe shell32.dll Control_RunDLL sysdm.cpl"  

' To Display the Accessibility Properties
run "rundll32.exe shell32.dll Control_RunDLL access.cpl"

'To Show the Display Settings Properties
run "rundll32.exe shell32.dll Control_RunDLL desk.cpl"

'To Display Internet Explorer Control Panet
run "rundll32.exe shell32.dll Control_RunDLL inetcpl.cpl"  

'To Display Regional Settings
run "rundll32.exe shell32.dll Control_RunDLL intl.cpl"  

'To Display the Mouse Settings
run "rundll32.exe shell32.dll Control_RunDLL main.cpl @0"  

'To Display the Keyboard Settings
run "rundll32.exe shell32.dll Control_RunDLL main.cpl @1"  

'To Display the Joystick Settings
run "rundll32.exe shell32.dll Control_RunDLL joy.cpl"  

'To Display Multimedia Settings
run "rundll32.exe shell32.dll Control_RunDLL mmsys.cpl"  

'To Display Modem Settings
run "rundll32.exe shell32.dll Control_RunDLL modem.cpl"  

'To Display 'Add New Printer' Wizard 
run "rundll32.exe shell32.dll SHHelpShortcuts_RunDLL AddPrinter"  

'To Display Time/Date Settings
run "rundll32.exe shell32.dll Control_RunDLL timedate.cpl"  

'To display the Copy Disk dialog for removable media
run "rundll32.exe diskcopy.dll DiskCopyRunDll"

'To Display the floppy disk Format Drive dialog.
run "rundll32.exe shell32.dll SHFormatDrive"

'To create a new Briefcase on the desktop
run "rundll32.exe syncui.dll,Briefcase_Create "

'To Display Fonts Folder
run "rundll32.exe shell32.dll SHHelpShortcuts_RunDLL FontsFolder"

'To Display the Printers Folder
run "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder"  

'To Display the Application/File "Open With" dialog 
'--passing the full file drive, path and name as a parameter will 
'--cause the dialog to display the line 
'"Click the program you want to use to open the file '{filename}'". 
'--note that the filename given as the last argument MUST be the name
'--of an existing file on disk
run "rundll32.exe shell32.dll,OpenAs_RunDLL c:\my documents\test.bas"

'To Display Themes Applet, if installed
run "rundll32.exe shell32.dll,Control_RunDLL themes.cpl" 

'To Display Telephony Properties
run "rundll32.exe shell32.dll,Control_RunDLL telephon.cpl"
                
'To Display Office FindFast, if installed
run "rundll32.exe shell32.dll Control_RunDLL findfast.cpl"       


Home

Wire 1.0

Gif Viewer

Report Generation

Flow Charting

Stylebits Corner

Tip Corner

API Corner

CodeAChrome

Sprite Byte

Control Panel Applets

HTTPS Data

Eddie

Submissions

Index